package com.cn.aam.checaiduo.ui.more;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.cn.aam.checaiduo.R;
import com.cn.aam.checaiduo.backend.RetrofitHome;
import com.cn.aam.checaiduo.base.BaseActivity;
import com.cn.aam.checaiduo.base.ToolBarManager;
import com.cn.aam.checaiduo.ui.arouter.UIRouter;
import com.cn.aam.checaiduo.ui.arouter.section.RouterMore;
import com.cn.aam.checaiduo.utils.MyViewsUtils;

import butterknife.OnClick;


@Route(path = UIRouter.MORE.HELP_CENTER, name = "帮助中心")
public class HelpCenterActivity extends BaseActivity {


    @Override
    protected int layoutId() {
        return R.layout.activity_help_center;
    }

    @Override
    protected void initView() {
        ToolBarManager.with(this, WMContent)
                .setTitle("帮助中心")
                .setNavigationIcon(R.drawable.ic_nav_arrow_white);
    }

    //新手指南
    @OnClick(R.id.block_newbie_guide)
    public void onClickGuide() {
        if (MyViewsUtils.isFastDoubleClick()) return;
        UIRouter.getInstance().getMore().openSubHelpCenter(mContext, HelpCenterDetailIActivity.LESSON.GUIDE);
    }

    //操作流程
    @OnClick(R.id.block_operation_procedure)
    public void onClickProcedure() {
        if (MyViewsUtils.isFastDoubleClick()) return;
        UIRouter.getInstance().getMore().openSubHelpCenter(mContext, HelpCenterDetailIActivity.LESSON.PROCEDURE);
    }

    //常见问题
    @OnClick(R.id.block_faq)
    public void onClickFAQ() {
        if (MyViewsUtils.isFastDoubleClick()) return;
        UIRouter.getInstance().getMore().openSubHelpCenter(mContext, HelpCenterDetailIActivity.LESSON.FAQ);
    }

    //联系我们
    @OnClick(R.id.block_contact)
    public void onClickContact() {
        if (MyViewsUtils.isFastDoubleClick()) return;
        String url = RetrofitHome.HOST_API + "Wap/Usercenter/contactus.html";
        UIRouter.getInstance().getWeb().openWebPage(mContext, url, "联系我们");
    }
}
